Documentation Home Give Thanks / Docs & Website / Email Support

XML: mySettings

The mySettings.xml file contains all of the user configurable settings within AmphetaDesk, allowing you to change the name of the program, the url's used for various updating functions (and whether AmphetaDesk should even use them), as well as a myriad of other tags that control AmphetaDesk's behavior.

Below, you'll find an explanation of each setting, as well as default values and how they're constructed internally. You'll also see, for completeness's sake, a list of all the settings you can't change. (NOTE: the XML example below, while syntactically correct, has been truncated to not wordwrap on small resolutions. Do NOT use the example as a representation of the default values.).

Nothing below (or even the existence of mySettings.xml) is required - default values are used. Tags occur only once.

<?xml version="1.0"?>
<settings>
   <app>
      <contact>Morbus Iff</contact>
      <copyright>Copyleft 2000-2002 Disobey.com</copyright>
      <email>morbus@disobey.com</email>
      <name>AmphetaDesk</name>
      <version>v0.24</version>
      <url>http://www.disobey.com/amphetadesk/</url>
   </app>
   <names>
      <file_log>AmphetaDesk.log</file_log>
      <file_myChannels>myChannels.opml</file_myChannels>
      <file_services_channels>services-channels.xml</file_services_channels>
      <file_version>version.txt</file_version>
      <gui_linux_icon>linux_icon.png</gui_linux_icon>
      <gui_linux_logo>linux_logo.png</gui_linux_logo>
      <gui_macos_icon>mac_icon.pict</gui_macos_icon>
      <gui_macos_logo>macos_logo.pict</gui_macos_logo>
      <gui_win_icon.ico</gui_win_icon>
      <gui_win_logo>win_logo.bmp</gui_win_logo>
      <tpl_add_a_channel>add_a_channel.html</tpl_add_a_channel>
      <tpl_channel_footer>channel_footer.html</tpl_channel_footer>
      <tpl_channel_header>channel_header.html</tpl_channel_header>
      <tpl_channel_item>channel_item.html</tpl_channel_item>
      <tpl_channel_list_item>channel_list_item.html</tpl_channel_list_item>
      <tpl_channel_list_item_new>...new.html</tpl_channel_list_item_new>
      <tpl_channels_home>index.html</tpl_channels_home>
      <tpl_my_channels>my_channels.html</tpl_my_channels>
      <tpl_my_settings>my_settings.html</tpl_my_settings>
   </names>
   <urls>
      <port_default>8888</port_default>
      <port_secondary>4888</port_secondary>
      <port_tertiary>48888</port_tertiary>
      <version_current>http://.../version.txt</version_current>
      <services_channels>http://.../services-channels.xml</services_channels>
   </urls>
   <user>
      <browser_path>/path/to/example/browser</browser_path>
      <link_target>_blank</link_target>
      <strict_xml>0</strict_xml>
   </user>
</settings>

<app>

Allowed Within: <settings>
Default: n/a
Template: n/a

The <app> element encases "personality" entries - such as the <name> of the program, the <url> where more information can be found, a <contact> name and <email>, <version> numbers, <copyright> notices and the like. These values are sprinkled throughout error messages, remote http calls, and usable within templates.

<browser_path>

Allowed Within: <user>
Default: default
Template: [$ user_browser_path $]

If the user would like to force the program to use a specific browser, they can enter the full path to the program in this tag. We'll attempt to pass the URL off to this application as a command line flag (Windows/Linux). Although an implementation has not yet been finalized for the MacOS, we'll probably do something with AppleEvents.

<contact>

Allowed Within: <app>
Default: Morbus Iff
See Also: <email>
Template: [$ app_contact $]

The contact person or entity to reach regarding more information. Used internally only in certain error messages.

<copyright>

Allowed Within: <app>
Default: Copyleft 2000-2002 Disobey.com
Template: [$ app_copyright $]

The copyright statement of the program - only used internally during startup.

<email>

Allowed Within: <app>
Default: morbus@disobey.com
See Also: <contact>
Template: [$ app_email $]

An email address associated with the program. Used only in certain error messages.

<file_log>

Allowed Within: <names>
Default: AmphetaDesk.log
Template: [$ name_file_log $]

The name of the program's log file.

<file_myChannels>

Allowed Within: <names>
Default: myChannels.opml
Template: [$ name_file_myChannels $]

The name of file which contains all the user's channel subscriptions.

<file_services_channels>

Allowed Within: <names>
Default: services-channels-recent.xml
Template: [$ name_file_services_channels $]

The file name of the master channel list, containing all the shipped services a user can subscribe to.

<file_version>

Allowed Within: <names>
Default: version.txt
Template: [$ name_file_version $]

The file name containing the latest version info from the <version_current> URL.

<gui_linux_icon>

Allowed Within: <names>
Default: linux_icon.png
Template: [$ name_gui_linux_icon $]

The file name containing the Linux icon for AmphetaDesk, in PNG format. Currently, since there's no GUI for Linux, this is not useful - eventually, there may be a Tk interface where this is used.

<gui_linux_logo>

Allowed Within: <names>
Default: linux_logo.png
Template: [$ name_gui_linux_logo $]

The file name containing the Linux logo for AmphetaDesk, in PNG format. Currently, since there's no GUI for Linux, this is not useful - eventually, there may be a Tk interface where this is used.

<gui_macos_icon>

Allowed Within: <names>
Default: macos_icon.pict
Template: [$ name_gui_macos_icon $]

The file name containing the MacOS icon for AmphetaDesk, in PICT format. This is not used in the actual GUI interface of AmphetaDesk for MacOS, but rather simply as the icon for the runtime application.

<gui_macos_logo>

Allowed Within: <names>
Default: macos_logo.pict
Template: [$ name_gui_macos_logo $]

The file name containing the MacOS logo for AmphetaDesk, in PICT format. This is used in the GUI displayed before opening the browser window and will be scaled to fit.

<gui_win_icon>

Allowed Within: <names>
Default: win_icon.ico
Template: [$ name_gui_win_icon $]

The file name containing the Windows icon for AmphetaDesk, in ICO format. This is used as the application runtime icon, the systray icon, and the window title icon.

<gui_win_logo>

Allowed Within: <names>
Default: win_logo.bmp
Template: [$ name_gui_win_logo $]

The file name containing the Windows logo for AmphetaDesk, in BMP format. This is used in the GUI displayed before opening the browser window and will be scaled to fit.

<link_target>

Allowed Within: <user>
Default: _blank
Template: [$ user_link_target $]

This setting controls how external links function in the various channel items that the user sees - if the setting is "_blank" (the default), then all external links will open in a new window. If set to "_parent", then links will open in the same window.

<name>

Allowed Within: <app>
Default: AmphetaDesk
Template: [$ app_name $]

The name of the program. Used to identify itself in requests to other servers, window titles, error messages, etc.

<names>

Allowed Within: <settings>
Default: n/a
Template: n/a

The <names> block describes the various identities of all the files within the program - it'll allow you to change all the external file names (like templates, myChannels, version files, services files, etc.) to your liking. These file names are then used to construct the full path to the file in question.

<port_default>, <port_secondary>, <port_tertiary>

Allowed Within: <urls>
Default: 8888, 4888, 48888
Template: [$ url_port_default $], [$ url_port_secondary $], [$ url_port_tertiary $]

The port that the internal webserver runs on. All constructed urls will have the successfully grabbed port value hardcoded within them. If we can't run on the default port, we try the secondary port, and finally the tertiary port. If we can't latch on to any of them, we quit.

<services_channels>

Allowed Within: <urls>
Default: http://www.disobey.com/amphetadesk/lists/services-channels-recent.xml
Template: [$ url_services_channels $]

The url of the master channel list - this url is checked for updates, and saved into $main::SETTINGS->{dir}->{internal} when it's out of date. It's file name is determined by <file_services_channels>.

<strict_xml>

Allowed Within: <user>
Default: 0
Template: [$ user_strict_xml $]

This setting controls whether AmphetaDesk should use strict XML parsing when trying to display an RSS feed. By default, this setting is turned off - meaning that AmphetaDesk should try everything in it's power to get the channel to display. This means we'll remove white space before the XML declaration, strip newlines and tabs, convert & to &amp;, convert unencoded HTML links to encoded form, encode &lt;valid> possibilities (which could cause HTML display problems if it became <xml> or <title> due to autoexpansion by the XML parser), convert " to &quot;, remove CDATA declarations, and convert unencoded entities to their HTML equivalents. If this setting is turned on, we won't do any of that, and trust that the writer of the feed has guaranteed valid / well-formed XML. If they haven't, we don't display the feed.

<tpl_add_a_channel>

Allowed Within: <names>
Default: add_a_channel.html
Template: [$ name_tpl_add_a_channel $]

The file name of the "Add A Channel" page.

<tpl_channel_footer>

Allowed Within: <names>
Default: channel_footer.html
See Also: <tpl_channel_header>, <tpl_channel_item>
Template: [$ name_tpl_channel_footer $]

The name of the template parsed once for each channel and shown after all the channel's items. If this file doesn't exist, then no footer is displayed.

<tpl_channel_header>

Allowed Within: <names>
Default: channel_header.html
See Also: <tpl_channel_footer>, <tpl_channel_item>
Template: [$ name_tpl_channel_header $]

The name of the template parsed once for each channel and shown before the channel's items.

<tpl_channel_item>

Allowed Within: <names>
Default: channel_item.html
See Also: <tpl_channel_footer>, <tpl_channel_header>
Template: [$ name_tpl_channel_item $]

For each item of each channel, this template will be parsed, and controls how the item is actually displayed.

<tpl_channels_home>

Allowed Within: <names>
Default: index.html
Template: [$ name_tpl_channels_home $]

The file name of the "Channels Home" page. This is also the starting page of AmphetaDesk.

<tpl_channel_list_item>

Allowed Within: <names>
Default: channel_list_item.html
See Also: <tpl_channel_list_item_new>
Template: [$ name_tpl_channel_list_item $]

The name of the template parsed for an item that needs to have a checkbox.

<tpl_channel_list_item_new>

Allowed Within: <names>
Default: channel_list_item_new.html
See Also: <tpl_channel_list_item>
Template: [$ name_tpl_channel_list_item_new $]

The name of the template parsed for a new item (added within the past month) that needs to have a checkbox. This file is entirely optional - if it doesn't exist, then <tpl_channel_list_item> is used in its place.

<tpl_my_channels>

Allowed Within: <names>
Default: my_channels.html
Template: [$ name_tpl_my_channels $]

The file name of the "My Channels" page.

<tpl_my_settings>

Allowed Within: <names>
Default: my_settings.html
Template: [$ name_tpl_my_settings $]

The file name of the "My Settings" page.

<url>

Allowed Within: <app>
Default: http://www.disobey.com/amphetadesk/
Template: [$ app_url $]

The full url where people can find more information about the program. Used internally only in headers.

<urls>

Allowed Within: <services>
Default: n/a
Template: n/a

<urls> hilights the port number to be used for the internal server, as well as some remote urls for program updating (like the channels list and the remote version file for update comparison).

<user>

Allowed Within: <services>
Default: n/a
Template: n/a

<user> hilights all of the user's personal settings and desires with the program - whether it be choosing a different browser for display, determining how often (or even whether) to check for updates over the 'net, or a multitude of other options.

<version>

Allowed Within: <app>
Default: varies (in the form of v.XX)
Template: [$ app_version $]

The internal version of the program, used to determine if a newer version is available. Also shown in headers.

<version_current>

Allowed Within: <urls>
Default: http://www.disobey.com/amphetadesk/version.txt
Template: [$ url_version_current $]

The url downloaded to find out the latest version of AmphetaDesk. The data from this url is saved to <file_version> and compared against <app_version>.

The following entries CAN NOT be modified through the mySettings.xml and are hardcoded into AmphetaDesk.
The variable names are how they are referenced in the code - most are available through templates.

SettingDescription
$main::SETTINGS->{dir}->{data} The full path to the data directory (where all internal, channel, and list data lives). Determined by taking $main::SETTINGS->{dir}->{location} and appending 'data'. Default: /path/to/AmphetaDesk/data/.
$main::SETTINGS->{dir}->{data_channels} The full path to the directory where all the channel files are saved. Determined by taking $main::SETTINGS->{dir}->{data} and appending 'channels'. Default: /path/to/AmphetaDesk/data/channels/.
$main::SETTINGS->{dir}->{data_internal} The full path to the directory where all the boring internal files are stored, like the logfiles, version checks, and so forth. Determined by taking $main::SETTINGS->{dir}->{dir_data} and appending 'internal'. Default: /path/to/AmphetaDesk/data/internal/.
$main::SETTINGS->{dir}->{data_lists} The full path to the directory where all the service lists (containing the possible channels to subscribe to) are saved. Determined by taking $main::SETTINGS->{dir}->{data} and then appending 'lists'. Default: /path/to/AmphetaDesk/data/lists/.
$main::SETTINGS->{dir}->{dlmtr} This is the directory delimiter, used to create various full paths to our our directories. Defaults to / but will become a : if on a Macintosh.
$main::SETTINGS->{dir}->{docs} The full path to the docs directory (where all documentation is located). This variable is set so that the webserver knows where to remap requests to. Determined by taking $main::SETTINGS->{dir}->{location} and appending 'docs'. Default: /path/to/AmphetaDesk/docs/.
$main::SETTINGS->{dir}->{gui} The full path to the gui directory (where all icons and logos are stored for the runtime GUI). Determined by taking $main::SETTINGS->{dir}->{location} and appending 'gui'. Default: /path/to/AmphetaDesk/gui/.
$main::SETTINGS->{dir}->{location} Determined at runtime, this is the full path to the running directory of the program - most of the other path information is determined from this variable.
$main::SETTINGS->{dir}->{templates} The full path to the template directory. Determined by taking $main::SETTINGS->{dir}->{location} and appending 'templates'. Default: /path/to/AmphetaDesk/templates/.
$main::SETTINGS->{files}->{gui_linux_icon} Full path to the Linux icon. Determined by taking $main::SETTINGS->{dir}->{gui} and adding <gui_linux_icon>. Default: /path/to/AmphetaDesk/gui/linux_icon.png.
$main::SETTINGS->{files}->{gui_linux_logo} Full path to the Linux logo. Determined by taking $main::SETTINGS->{dir}->{gui} and adding <gui_linux_logo>. Default: /path/to/AmphetaDesk/gui/linux_logo.png.
$main::SETTINGS->{files}->{gui_macos_icon} Full path to the MacOS icon. Determined by taking $main::SETTINGS->{dir}->{gui} and adding <gui_macos_icon>. Default: /path/to/AmphetaDesk/gui/macos_icon.pict.
$main::SETTINGS->{files}->{gui_macos_logo} Full path to the MacOS logo. Determined by taking $main::SETTINGS->{dir}->{gui} and adding <gui_macos_logo>. Default: /path/to/AmphetaDesk/gui/macos_logo.pict.
$main::SETTINGS->{files}->{gui_win_icon} Full path to the Windows icon. Determined by taking $main::SETTINGS->{dir}->{gui} and adding <gui_win_icon>. Default: /path/to/AmphetaDesk/gui/win_icon.ico.
$main::SETTINGS->{files}->{gui_win_logo} Full path to the Windows logo. Determined by taking $main::SETTINGS->{dir}->{gui} and adding <gui_win_logo>. Default: /path/to/AmphetaDesk/gui/win_logo.bmp.
$main::SETTINGS->{files}->{log} Full path to the program's logfile. Determined by taking $main::SETTINGS->{dir}->{internal} and adding <file_log>. Default: /path/to/AmphetaDesk/data/internal/AmphetaDesk.log.
$main::SETTINGS->{files}->{myChannels} Full path to the user's subscription list. Determined by taking $main::SETTINGS->{dir}->{data} and adding <file_myChannels>. Default: /path/to/AmphetaDesk/data/myChannels.opml.
$main::SETTINGS->{files}->{mySettings} Full path to the user's settings in xml format. Determined by taking $main::SETTINGS->{dir}->{data} and adding 'mySettings.xml'. Default: /path/to/AmphetaDesk/data/mySettings.xml.
$main::SETTINGS->{files}->{services_channels} Full path to the master channel list. Determined by taking $main::SETTINGS->{dir}->{lists} and adding <file_services_channels>. Default: /path/to/AmphetaDesk/data/internal/services-channels-recent.xml.
$main::SETTINGS->{files}->{version} Full path to the saved version file. Determined by taking $main::SETTINGS->{dir}->{internal} and adding <file_version>. Default: /path/to/AmphetaDesk/data/internal/version.txt.
$main::SETTINGS->{tpl}->{add_a_channel} Full path to the "Add A Channel" page template, determined by adding <tpl_add_a_channel> to $main::SETTINGS->{dir}->{templates}. Default: /path/to/AmphetaDesk/templates/add_a_channel.html.
$main::SETTINGS->{tpl}->{channel_footer} Full path to the channel footer template, determined by adding <tpl_channel_footer> to $main::SETTINGS->{dir}->{templates}. Default: /path/to/AmphetaDesk/templates/channel_footer.html.
$main::SETTINGS->{tpl}->{channel_header} Full path to the channel title template, determined by adding <tpl_channel_header> to $main::SETTINGS->{dir}->{templates}. Default: /path/to/AmphetaDesk/templates/channel_header.html.
$main::SETTINGS->{tpl}->{channel_item} Full path to the channel item template, determined by adding <tpl_channel_item> to $main::SETTINGS->{dir}->{templates}. Default: /path/to/AmphetaDesk/templates/channel_item.html.
$main::SETTINGS->{tpl}->{channels_home} Full path to the "Channels Home" page template, also the home page of AmphetaDesk. Determined by adding <tpl_channels_home> to $main::SETTINGS->{dir}->{templates}. Default: /path/to/AmphetaDesk/templates/index.html.
$main::SETTINGS->{tpl}->{channel_list_item} Full path to the list item template, determined by adding <tpl_channel_list_item> to $main::SETTINGS->{dir}->{templates}. Default: /path/to/AmphetaDesk/templates/channel_list_item.html.
$main::SETTINGS->{tpl}->{channel_list_item_new} Full path to the "new" list item template, determined by adding <tpl_channel_list_item_new> to $main::SETTINGS->{dir}->{templates}. Default: /path/to/AmphetaDesk/templates/channel_list_item_new.html.
$main::SETTINGS->{tpl}->{my_channels} Full path to the "My Channels" page template, determined by adding <tpl_my_channels> to $main::SETTINGS->{dir}->{templates}. Default: /path/to/AmphetaDesk/templates/my_channels.html.
$main::SETTINGS->{tpl}->{my_settings} Full path to the "My Settings" page template, determined by adding <tpl_my_settings> to $main::SETTINGS->{dir}->{templates}. Default: /path/to/AmphetaDesk/templates/my_settings.html.
$main::SETTINGS->{urls}->{add_a_channel} This is the full url to the "Add a Channel" page. It's constructed by starting off with "http://127.0.0.1:", adding <port> and a "/" and finally adding <tpl_add_a_channel>. Default: http://127.0.0.1:8888/add_a_channel.html (although the port number is not set in stone).
$main::SETTINGS->{urls}->{channels_home} This is the full url to the "Channels Home" page. It's constructed by starting off with "http://127.0.0.1:", adding <port> and a "/" and finally <tpl_channels_home>. Default: http://127.0.0.1:8888/index.html (although the port number is not set in stone).
$main::SETTINGS->{urls}->{my_channels} This is the full url to the "My Channels" page. It's constructed by starting off with "http://127.0.0.1:", adding <port> and a "/" and then <tpl_my_channels>. Default: http://127.0.0.1:8888/my_channels.html (although the port number is not set in stone).
$main::SETTINGS->{urls}->{my_settings} This is the full url to the "My Settings" page. It's constructed by starting off with "http://127.0.0.1:", adding <port> and a "/" and then <tpl_my_settings>. Default: http://127.0.0.1:8888/my_settings.html (although the port number is not set in stone).
$main::SETTINGS->{urls}->{port} This is the actual port that we've been able to latch our webserver on to. This could be one of three: <urls_port_default>, <urls_port_secondary> or <urls_port_tertiary>. Default: most commonly, 8888.


Any questions about the above? Email morbus@disobey.com.
This footer was last updated 08/20/01; odds are the whole document was too.

 

Documentation Home Give Thanks / Docs & Website / Email Support